package cn.myjerry.sort.innerType;

import java.util.Arrays;

public class Demo02 {
	public static void main(String[] args) {
		String[] str = {"asd","ghu","dex","swz"};
		boolean exam = true;
		for(int i=0;i<str.length-1;i++) {
			exam = true;
			for(int j=0;j<str.length-1-i;j++) {
				if(str[j].compareTo(str[j+1]) > 0) {
					String item = str[j];
					str[j] = str[j+1];
					str[j+1] = item;
					exam = false;
				}
			}
			if(exam) {
				break;
			}
		}
		System.out.println(Arrays.toString(str));
	}
}
